package net.cathackers.devel.scmp.config.impl;

import java.util.Properties;



public class RosterDBConfig extends XMLDBConfig{
    protected final String ROSTER_ID_FIELD         = "rosterIDFieldName";
    protected final String USER_NAME               = "userNameFieldName";
    protected final String JID_FIELD               = "jidFieldName";
    protected final String ASK_FIELD	           = "askFieldName";
    protected final String SUBSCRIPTION_TYPE_FIELD = "subscriptionFieldName";
    protected final String NICK_NAME_FIELD         = "nickNameFieldName";
    protected final String GROUP_FIELD		   = "groupFiledName";
    
    
    public RosterDBConfig(){
	super();
	setRosterIDFieldName("rosterID");
	setUserNameFieldName("username");
	setJIDFieldName("JID");
	setNickNameFieldName("nick");
	setAskFieldName("ask");
	setSubscriptionTypeFieldName("sub");
	setGroupFieldName("groupName");
    }
    
    public RosterDBConfig(String configFile){
	super(configFile);
    }
    
    public RosterDBConfig(Properties backend){
	super(backend);
    }
    
    public String getRosterIDFieldName(){
	return backend_.getProperty(ROSTER_ID_FIELD);
    }
    public void setRosterIDFieldName(String dbRosterIDFieldName){
	backend_.setProperty(ROSTER_ID_FIELD, dbRosterIDFieldName);
    }
    
    public String getJIDFieldName(){
	return backend_.getProperty(JID_FIELD);
    }
    public void setJIDFieldName(String dbJIDFieldName){
	backend_.setProperty(JID_FIELD, dbJIDFieldName);
    }
    
    public String getNickNameFieldName(){
	return backend_.getProperty(NICK_NAME_FIELD);
    }
    public void setNickNameFieldName(String dbNickNameFieldName){
	backend_.setProperty(NICK_NAME_FIELD, dbNickNameFieldName);
    }
    
    public String getSubscriptionTypeFieldName(){
	return	backend_.getProperty(SUBSCRIPTION_TYPE_FIELD);
    } 
    public void setSubscriptionTypeFieldName(String dbSubscriptiontypeFieldName){
	backend_.setProperty(SUBSCRIPTION_TYPE_FIELD, dbSubscriptiontypeFieldName);
    }
    
    public String getAskFieldName(){
	return backend_.getProperty(ASK_FIELD);
    }
    public void setAskFieldName(String dbAskFieldName){
	backend_.setProperty(ASK_FIELD, dbAskFieldName);
    }
    
    public String getUserNameFieldName(){
	return backend_.getProperty(USER_NAME);
    }
    public void setUserNameFieldName(String dbUserNameFieldName){
	backend_.setProperty(USER_NAME, dbUserNameFieldName);
    }
    
    public String getGroupFieldName(){
	return backend_.getProperty(GROUP_FIELD);
    }
    public void setGroupFieldName(String dbGroupFiledName){
	backend_.setProperty(GROUP_FIELD, dbGroupFiledName);
    }
   
    
}